"""storm URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path,include

#swagger-ui来生成接口测试文档
from rest_framework_swagger.views import get_swagger_view
#使用coreapi来生成接口测试文档
from rest_framework.documentation import include_docs_urls


#swagger-ui来生成接口文档
schema_view=get_swagger_view(title='Django Rest API')

#加载静态文件的路径
from django.conf import  settings
from django.conf.urls.static import  static

urlpatterns = [
    path('admin/', admin.site.urls),
    path('login/',include('apps.login.url',namespace='login')),
    path('interface/',include('apps.api.url',namespace='interface')),
    path('perom/',include('apps.perom.url',namespace='perom')),
    #生成swagger-ui的API文档信息
    path('swagger-docs',schema_view),
    path('docs',include_docs_urls(title='Django Rest API')),
]+static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
